Optimal. Leaf size=138 \[ -\frac {a \tanh ^{-1}(a x)}{x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \log (x)-\frac {1}{2} a^2 \log \left (1-a^2 x^2\right )+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-a^2 \tanh ^{-1}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1+a x}\right )-\frac {1}{2} a^2 \text {PolyLog}\left (3,-1+\frac {2}{1+a x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 11, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6129, 6037,
272, 36, 29, 31, 6095, 6135, 6079, 6203, 6745} \begin {gather*} -\frac {1}{2} a^2 \text {Li}_3\left (\frac {2}{a x+1}-1\right )-a^2 \text {Li}_2\left (\frac {2}{a x+1}-1\right ) \tanh ^{-1}(a x)-\frac {1}{2} a^2 \log \left (1-a^2 x^2\right )+a^2 \log (x)+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2+a^2 \log \left (2-\frac {2}{a x+1}\right ) \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}-\frac {a \tanh ^{-1}(a x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 272
Rule 6037
Rule 6079
Rule 6095
Rule 6129
Rule 6135
Rule 6203
Rule 6745
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(a x)^2}{x^3 \left (1-a^2 x^2\right )} \, dx &=a^2 \int \frac {\tanh ^{-1}(a x)^2}{x \left (1-a^2 x^2\right )} \, dx+\int \frac {\tanh ^{-1}(a x)^2}{x^3} \, dx\\ &=-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a \int \frac {\tanh ^{-1}(a x)}{x^2 \left (1-a^2 x^2\right )} \, dx+a^2 \int \frac {\tanh ^{-1}(a x)^2}{x (1+a x)} \, dx\\ &=-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )+a \int \frac {\tanh ^{-1}(a x)}{x^2} \, dx+a^3 \int \frac {\tanh ^{-1}(a x)}{1-a^2 x^2} \, dx-\left (2 a^3\right ) \int \frac {\tanh ^{-1}(a x) \log \left (2-\frac {2}{1+a x}\right )}{1-a^2 x^2} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )+a^2 \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx+a^3 \int \frac {\text {Li}_2\left (-1+\frac {2}{1+a x}\right )}{1-a^2 x^2} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )-\frac {1}{2} a^2 \text {Li}_3\left (-1+\frac {2}{1+a x}\right )+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )-\frac {1}{2} a^2 \text {Li}_3\left (-1+\frac {2}{1+a x}\right )+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} a^4 \text {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{3} a^2 \tanh ^{-1}(a x)^3+a^2 \log (x)-\frac {1}{2} a^2 \log \left (1-a^2 x^2\right )+a^2 \tanh ^{-1}(a x)^2 \log \left (2-\frac {2}{1+a x}\right )-a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+a x}\right )-\frac {1}{2} a^2 \text {Li}_3\left (-1+\frac {2}{1+a x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.24, size = 133, normalized size = 0.96 \begin {gather*} -a^2 \left (-\frac {i \pi ^3}{24}+\frac {\tanh ^{-1}(a x)}{a x}+\frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2}{2 a^2 x^2}+\frac {1}{3} \tanh ^{-1}(a x)^3-\tanh ^{-1}(a x)^2 \log \left (1-e^{2 \tanh ^{-1}(a x)}\right )-\log \left (\frac {a x}{\sqrt {1-a^2 x^2}}\right )-\tanh ^{-1}(a x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(a x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(a x)}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 85.71, size = 1277, normalized size = 9.25
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1277\) |
default | \(\text {Expression too large to display}\) | \(1277\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {\operatorname {atanh}^{2}{\left (a x \right )}}{a^{2} x^{5} - x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {{\mathrm {atanh}\left (a\,x\right )}^2}{x^3\,\left (a^2\,x^2-1\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________